#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

int main()
{
    int n;
    scanf("%d", &n);
    if (n < 1)
    {
        printf("Error\n");
        return 0;
    }
    if (n % 2 == 0)
    {
        printf("Invalid\n");
        return 0;
    }
    for (int i = 0; i <= n / 2; i++)
    {
        for (int space = 0; space < n / 2 - i; space++)
            printf(" ");
        for (int j = 0; j < 2 * i + 1; j++)
            printf("*");
        for (int space = 0; space < n / 2 - i; space++)
            printf(" ");
        printf("\n");
    }
    for (int i = n / 2; i > 0; i--)
    {
        for (int space = 0; space < (n + 1) / 2 - i; space++)
            printf(" ");
        for (int j = 0; j < 2 * i - 1; j++)
            printf("*");
        for (int space = 0; space < (n + 1) / 2 - i; space++)
            printf(" ");
        printf("\n");
    }
    return 0;
}